// pages/mine/store_admin//jiebangbank.js
Page({

 
  data: {  bank:'',type:'',code:'',name:''

  },

  onLoad: function (options) {
      this.setData({
       
        id:options.id
      })
  },
  onShow(){
           this.jiebangbank1()
  },
  jiebangbank(){
     wx.request({
       url: 'https://zujieba.com/Api/money/del_bank.html',
       data:{id:this.data.id,type:1,uid:wx.getStorageSync('uid')},
       method:'POST',
       success:(res)=>{
        if(res.data.success==1){
          wx.showToast({
            title: res.data.tips,
          })
          setTimeout(()=>{
            wx.navigateBack()
          },1000)
        }else{
          wx.showToast({
            title: res.data.tips,
            icon:'none'
          })
        }
       }
     })
  },
  jiebangbank1(){
    wx.request({
      url: 'https://zujieba.com/Api/money/del_bank.html',
      data:{id:this.data.id,type:2,uid:wx.getStorageSync('uid')},
      method:'POST',
      success:(res)=>{
       if(res.data.success==1){
          this.setData({
            bank:res.data.data.bank
          })
        
       }else{
        
       }
      }
    })
 }
})